package CS;

public class Demo6 {
    public static void main(String[] args) {
        for (int i = 2; true; i++) {
            int k = 1, s = 0;
            for (int j = 1; j <= i; j++) {
                k *= 4;
                s = k + 1;
            }
            if (s <= 100000000) {
                for (int z = 2; z <= s; z++) {
                    if (s != z && s % z == 0) {
                        break;
                    }
                    if (s == z) {
                        System.out.println(s);
                    }
                }
            } else {
                return;
            }
        }
    }
}